Skip to content

Add WebSockets Quickstart page#53

Merged
Haakam21 merged 1 commit intomainfrom
fern/websockets-quickstart
Feb 13, 2026
Merged

Add WebSockets Quickstart page#53
Haakam21 merged 1 commit intomainfrom
fern/websockets-quickstart

Conversation

@fern-api
Copy link
Contributor

@fern-api fern-api bot commented Feb 13, 2026

Summary

Adds a new WebSockets Quickstart page with TypeScript and Python code examples under the WebSockets section.


Link to Devin run
Requested by: Fern Support (info@buildwithfern.com)


Summary by cubic

Added a WebSockets Quickstart page with TypeScript and Python examples to help users stream real-time email events. Updated docs navigation to include the Quickstart under the WebSockets section.

  • New Features
    • New page with examples for connecting, waiting for open, subscribing to inbox IDs, and handling Subscribed and MessageReceivedEvent.

Written for commit 352dab6. Summary will update on new commits.

@github-actions
Copy link

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="fern/pages/websockets-quickstart.mdx">

<violation number="1" location="fern/pages/websockets-quickstart.mdx:20">
P1: Inconsistent event discriminator: `event.type` is checked for the subscribed case but `event.eventType` for the message-received case. If the SDK uses a single discriminant field, one of these checks is wrong and the corresponding branch will never execute. Verify the SDK's actual event shape and use a consistent property name.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

socket.on("message", async (event) => {
if (event.type === "subscribed") {
console.log("Subscribed to", event.inboxIds);
} else if (event.eventType === "message.received") {
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Inconsistent event discriminator: event.type is checked for the subscribed case but event.eventType for the message-received case. If the SDK uses a single discriminant field, one of these checks is wrong and the corresponding branch will never execute. Verify the SDK's actual event shape and use a consistent property name.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At fern/pages/websockets-quickstart.mdx, line 20:

<comment>Inconsistent event discriminator: `event.type` is checked for the subscribed case but `event.eventType` for the message-received case. If the SDK uses a single discriminant field, one of these checks is wrong and the corresponding branch will never execute. Verify the SDK's actual event shape and use a consistent property name.</comment>

<file context>
@@ -0,0 +1,50 @@
+  socket.on("message", async (event) => {
+    if (event.type === "subscribed") {
+      console.log("Subscribed to", event.inboxIds);
+    } else if (event.eventType === "message.received") {
+      console.log(`Received message from: ${event.message.from}`);
+    }
</file context>
Fix with Cubic

@Haakam21 Haakam21 merged commit 09846c6 into main Feb 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant